#include <stdio.h>
#include <stdlib.h>
#include "ihex.h"


int main(int argc,char **argv)
{

  FILE   *file;
  struct s_ihex_node *node;
  unsigned int x,y;
  
  node = ihex_load(argv[1]);
  
  while(node!=0)
  {
    printf("addr=%-.x\n",node->address);
    
    for(y=0;y<32;y++)
    {
      printf("%-.4x: ",y*16);
      for(x=0;x<16;x++)
      {
        printf("%-.2x ",node->data[y*16+x]);
      }
      printf("\n");
    }
  
    node=node->next;
  }
}
